﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using QL_DTTN.DAL;
namespace QL_DTTN.DTO.DTO
{
    public partial  class KyThi
    {
        public  object Them(KyThi kyThi)
        {
            string str = " insert into " + _tableName + " (TenKyThi,NamThi) values (@pTenKyThi,@pNamThi) select @@IDENTITY ";
            SqlDataProvider dp = new SqlDataProvider();
            dp.AddParameter(new SqlParameter("@pTenKyThi", kyThi.TenKyThi));
            dp.AddParameter(new SqlParameter("@pNamThi", kyThi.NamThi));
            object kq=null;
            if (dp.RunReturnSQL(str, ref kq, true)) return kq;
            else return -1;
        }
    }
}
